home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
PET
/
S-Super PET
/
(s)t5.d64
/
EDA.LINE.INF
< prev
next >
Wrap
Text File
|
2009-01-18
|
2KB
|
36 lines
PPPP function line PPPP
@@@@@@@@@@@@@
introduction this function fits a straight line to a set of data
@@@@@@@@@@@@ points according to the relation >_
y % y_intercept - slope = x.
it returns values for the slope, y_intercept, and
if requested, the residuals.
the function accepts either a numeric vector or a
two column array as its argument. if the argument is
a vector of size n, the carrier is the first n
positive integers.
the parameter KresidsK :default%0" may be set
to 1 to pruduce residuals
command syntax line dddd _display the slope and y_intercept
@@@@@@@@@@@@@@ of data in dddd
resids[1 _produce residuals
z[line dddd _fit a line to data in dddd and
store the residuals in variable z
PPPP practice PPPP
this workspace contains the data set called insects :p 12, mcneil".
try the following commands >_
insects _display data in insects
line ,insects _calculates slope and intercept of a line
fitted to the data and the first 72 integers
line insects;<1 2' _gives slope and intercept of a line fitted
to col 2 against col 1